package com.putable.cgw.game.yard;

import java.awt.Dimension;
import java.awt.Point;

import com.putable.cgw.game.member.Member;


public interface Yard {
	
	/**
	 * Gets the Member at the given position
	 * 
	 * @param x
	 *            The x position in the yard
	 * @param y
	 *            The y position in the yard
	 * @return The Member at the given point
	 */
	public Member get(Point p);
	
	/**
	 * Sets the given member in the given position in the yard
	 * 
	 * @param m
	 *            The member to be put in the yard
	 * @param x
	 *            The x position of the yard
	 * @param y
	 *            The y position of the yard
	 * @return true if successfully put Member in that position
	 */
	public boolean put(Member m);
	
	/**
	 * Erases any member in given position
	 * 
	 * @param x
	 *            The x position in the yard
	 * @param y
	 *            The y position in the yard
	 */
	public void erase(Point p);
	
	/**
	 * Overloaded method for erasing using x and y coordinates.
	 * @param x x position of the <code>Member</code> to be erased.
	 * @param y y position of the <code>Member</code> to be erased.
	 */
	public void erase(int x, int y);
	
	/**
	 * Erases all <code>Members</code> from the <code>Yard<code>. 
	 */
	public void eraseAll();
	
	/**
	 * Returns the <code>Dimension</code> of the yard.
	 * @return the <code>Dimension</code> of the yard.
	 */
	public Dimension getDimension();
	
	/**
	 * Returns the number of <code>Member</code>s contained in this 
	 * <code>Yard</code>.
	 * @return The number of <code>Members</code> contained by this <code>Yard</code>.
	 */
	public int size();
}
